Package-level declarations

Types

Link copied to clipboard
data class ButtonColours(val border: AppColour, val container: AppColour, val content: AppColour)

Model to provide colours for a button.

Link copied to clipboard

Object for property models for the SourceButton component.

Functions

Link copied to clipboard
fun PlainSourceButton(text: String, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, buttonColours: ButtonColours = PlainDefault, disabledButtonColours: ButtonColours? = null, size: SourceButton.Size = SourceButton.Size.Small, iconSide: SourceButton.IconSide = SourceButton.IconSide.Left, icon: @Composable (Modifier) -> Unit = {})

A plain Source button component with text and an optional icon. This has no Source colour theming. Provide buttonColours to theme the button.

Link copied to clipboard
fun PlainSourceContentButton(size: SourceButton.Size, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, buttonColours: ButtonColours = PlainDefault, disabledButtonColours: ButtonColours? = null, content: @Composable () -> Unit)

A plain, basic Source compatible button component. This button does not have any Source colour theming. Provide buttonColours to theme the button.

Link copied to clipboard
fun SourceBaseIconButton(size: SourceButton.Size, buttonColours: ButtonColours, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, disabledButtonColours: ButtonColours? = null, icon: @Composable (Modifier) -> Unit = {})

Source icon-only button. This variant allows providing the icon as a composable slot.

Link copied to clipboard
fun SourceButton(text: String, priority: SourceButton.Priority, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, size: SourceButton.Size = SourceButton.Size.Small, theme: Source.Theme? = null, iconSide: SourceButton.IconSide = SourceButton.IconSide.Left, icon: @Composable (Modifier) -> Unit = {})

A Source button component with text and an optional icon.

Link copied to clipboard
fun SourceContentButton(size: SourceButton.Size, priority: SourceButton.Priority, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, theme: Source.Theme? = null, content: @Composable () -> Unit)

A basic Source compatible button component. This is a low-level component and should be sparingly used only for custom buttons. Prefer to use SourceButton or SourceIconButton instead.

Link copied to clipboard
fun SourceIconButton(icon: ImageBitmap, priority: SourceButton.Priority, contentDescription: String?, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, size: SourceButton.Size = SourceButton.Size.Medium, theme: Source.Theme? = null)
fun SourceIconButton(painter: Painter, priority: SourceButton.Priority, contentDescription: String?, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, size: SourceButton.Size = SourceButton.Size.Medium, theme: Source.Theme? = null)
fun SourceIconButton(icon: ImageVector, priority: SourceButton.Priority, contentDescription: String?, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, size: SourceButton.Size = SourceButton.Size.Medium, theme: Source.Theme? = null)

Source icon-only button.